
# 	#print "start"."\n";
# 	open(IN,"tmp.f2.nbr.2.txt");
# 	chomp(@array = <IN>);
# 	close(IN);
# 	#print $array[2]."\n";
# 	#exit(0);
# 	open(IN,"tmp.f1.nbr.2.txt");
# 	$n=0;
# 	while($line=<IN>){
# 	  chomp($line);
# 	  #$line='000913-8048652';
# 	  #print $line."\n";
# 	  $r = &binarySearch(\@array,$line);
# 	  #print $r."\n";
# 	  if( $r < 0) {
# 		print $line."\n";
# 		#print "not find:".$line."\n";
# 	  }
# 	  $n=$n+1;
# 	  if($n % 1000 == 0) {
# 		#last;
# 		#print $n."\n";
# 	  }
# 	}
# 	close(IN);

# 	#二分查找算法
# 	sub binarySearch {
# 		($list, $query) = @_;
# 		($low, $high)   = ($[, $#$list);
# 		#print "[$low,$high] $query\n";
# 		#return -1;
		
# 		while ( $low <= $high ) {
# 			my $try = int( ($low + $high) / 2 );
# 			#print "[$low,$high][$try] $list->[$try] vs $query\n";

# 			# note: "lt" and "gt" because we are comparing strings
# 			# if we were comparing numbers then we would use "<" and ">"
# 			$list->[$try] lt $query and do { $low  = $try + 1; next };
# 			$list->[$try] gt $query and do { $high = $try - 1; next };

# 			return $try; # By this point it must be equal!
# 		}
# 		return -$try-1; # not find
# 	}


# ## 调试

#     perl -d 程序文件	可以进入调试方式运行，每次运行一条语句
#     h [cmd]	显示帮助
#     n	运行下一条语句
#     print 变量	打印变量
#     l	列出程序下面10行
#     b 行号	设置断点
#     d 行号	取消断点
#     c	运行直到断点或程序末尾
#     q	退出


#     @words = split(/ /, "all of ars")

# ## 调用子进程

#     ``

# ## 函数

#     int    int（5.6）  =5
#     length  length("nose")  =4
#     lc  lc（"ME TOO"） ="me too"
#     uc  uc（"hal 9000"）  ="HAL 9000"
#     cos cos（50） =.964966
#     rand rand（5）    返回从0到小于该参数值之间的一个随机数字。如果该参数被省略，则返回0至1之间的一个数字

#     print
#     split
#     join
#     scalar
#     sort	可用语句块
    
#     open
#     close
#     chomp
    
#     index
#     rindex
#     substr
    
#     push
#     pop
#     shift
#     unshift
    
#     opendir
#     closedir
#     chdir
#     mkdir
    
#     unlink
#     rename
#     chmod
#     stat
    
#     system
#     `ls`
#     qx{}


# ## 引用

#     &ab=\$ab
#     $$ab

# ## 常用

# ### 参数解析

# <http://www.php-oa.com/2009/04/04/perl_getopt-long.html>

#     use strict;
#     use Getopt::Long;
    
#     my $STATE_OK=0;
#     my $STATE_WARNING=1;
#     my $STATE_CRITICAL=2;
#     my $STATE_UNKNOWN=3;
    
#     my $input = @ARGV;
#     my $host = "127.0.0.1";
#     my $port = 9425;
#     my $warning = 0;
#     my $critical = 0;
    
#     my $help = undef;
#     my $debug = undef;
    
#     my $remaining = undef;
#     my $deadnodes = undef;
#     my $failedvolumes = undef;
#     my $filetotal = undef;
#     my $unreplicated = undef;
#     my $blacknodes = undef;
#     my $jobsinfo = undef;
#     my $cptime = undef;
#     my $editlog = undef;
    
    
#     GetOptions (
#         'h'     => \$help,           'help'             => \$help,
#         'd'     => \$debug,          'debug'            => \$debug,
#         'ht=s'  => \$host,           'host=s'           => \$host,
#         'pt=i'  => \$port,           'port=i'           => \$port,
#         'rema'  => \$remaining,      'remaining'        => \$remaining,
#         'dead'  => \$deadnodes,      'deadnodes'        => \$deadnodes,
#         'volu'  => \$failedvolumes,  'failedvolumes'    => \$failedvolumes,
#         'file'  => \$filetotal,      'filetotal'        => \$filetotal,
#         'unre'  => \$unreplicated,   'unreplicated'     => \$unreplicated,
#         'blck'  => \$blacknodes,     'blacknodes'       => \$blacknodes,
#         'jobs'  => \$jobsinfo,       'jobsinfo'         => \$jobsinfo,
#         'cpti'  => \$cptime,         'cptime'           => \$cptime,
#     	'elog'  => \$editlog,        'editlog'          => \$editlog,
#         'w=s'   => \$warning,        'warning=s'        => \$warning,
#         'c=s'   => \$critical,       'critical=s'       => \$critical,
#     );


#     sub process_args {
#         while (@ARGV) {
#             $a = shift @ARGV;
#             if ($a eq "-h") {
#                 Usage();
#             } elsif ($a eq "-f") {
#                 $file= shift @ARGV;
#             } elsif ($a eq "-s") {
#                 $string= shift @ARGV ;
#             } else {
#                 Usage();
#             }
#         }
#     }